package com.apps.gomdiem.helper;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.location.LocationManager;
import android.provider.Settings;
import android.widget.Toast;

public class GPSUtil {

	public static boolean CheckGPSHelper(Activity con) {
		LocationManager service = (LocationManager) con.getSystemService(Context.LOCATION_SERVICE);
		boolean enabledGPS = service.isProviderEnabled(LocationManager.GPS_PROVIDER);
		
//		if (!enabledGPS) {
//			Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
//			con.startActivityForResult(intent, Activity.RESULT_CANCELED);
//			Toast.makeText(con, "KO CO GPS",
//					Toast.LENGTH_SHORT).show();
//		} else {
//			Toast.makeText(con, "CO GPS",
//					Toast.LENGTH_SHORT).show();
//		}
		
		return enabledGPS;

	}
}
